//
//  WYCHomeCell.m
//  初试
//
//  Created by 中企互联 on 2017/10/11.
//  Copyright © 2017年 李胜军. All rights reserved.
//

#import "WYCHomeCell.h"

@interface WYCHomeCell ()

/** 银行图标*/
@property(nonatomic,strong)UIImageView * bankImageView;

/** 顶部View */
@property (nonatomic,strong) UIView *topView;

/** 顶部View */
@property (nonatomic,strong) UIImageView *bigtopView;

/** 银行名称*/
@property (nonatomic,strong)UILabel * banklabel;


/** 姓名*/
@property (nonatomic,strong)UILabel * namelabel;

/** 尾号*/
@property (nonatomic,strong)UILabel * lsnameberlabel;

/** 账单日.天*/
@property (nonatomic,strong)UILabel * Statementlabel;

/** 账单日.出账单*/
@property (nonatomic,strong)UILabel * accountlabel;

/** 是否认证*/
@property (nonatomic,strong)UILabel * typelabel;
/** 还款日*/
@property (nonatomic,strong)UILabel * staylabel;

/** 还款日*/
@property (nonatomic,strong)UILabel * billamoutlabel;

/** 本期账单余额*/
@property (nonatomic,strong)UILabel * balancelabel;

/** name*/
@property(nonatomic,strong)UIView * bommoView;

@end
@implementation WYCHomeCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    WYCHomeCell * cell = [tableView dequeueReusableCellWithIdentifier:[WYCHomeCell ID]];
    //    cell.backgroundColor = [UIColor redColor];
    cell = [[WYCHomeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[WYCHomeCell ID]];
    cell.backgroundColor = [UIColor clearColor];
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setMember];
        
    }
    return self;
}
//cell控件摆放
- (void)setMember{
    
    self.contentView.backgroundColor = [UIColor clearColor];
    /** 顶部View */
    self.topView = [[UIView alloc] init];
    
    self.topView.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.topView];
    
    self.bigtopView = [[UIImageView alloc] init];
    
    //    self.bigtopView.backgroundColor = [UIColor whiteColor];
    self.bigtopView.layer.cornerRadius = 10 * px;
    self.bigtopView.backgroundColor = [UIColor clearColor];
    self.bigtopView.layer.masksToBounds = YES;
    
    self.bigtopView.layer.shadowColor = [UIColor blackColor].CGColor;//设置阴影的颜色
    
    self.bigtopView.layer.shadowOpacity = 0.1;//设置阴影的透明度
    
    self.bigtopView.layer.shadowOffset = CGSizeMake(1, 1);//设置阴影的偏移量
    
    self.bigtopView.layer.shadowRadius = 3;//设置阴影的圆角
    [self.topView addSubview:self.bigtopView];
    
    /** 银行图标*/
    self.bankImageView = [[UIImageView alloc] init];
    //    self.bankImageView.backgroundColor = [UIColor redColor];
    [self.bigtopView addSubview:self.bankImageView];
    
    /** 银行名称*/
    self.banklabel = [[UILabel alloc] init];
    self.banklabel.font = [UIFont systemFontOfSize:50 * px];
    self.banklabel.textColor = WYCRGBColor(52, 52, 52);
    [self.bigtopView addSubview:self.banklabel];
    
    
    /** 银行名称*/
    self.billamoutlabel = [[UILabel alloc] init];
    self.billamoutlabel.font = [UIFont systemFontOfSize:70 * px];
    self.billamoutlabel.textColor = WYCmainColor;
    [self.bigtopView addSubview:self.billamoutlabel];
    
    
    /** 姓名*/
    self.namelabel = [[UILabel alloc] init];
    self.namelabel.textColor = [UIColor blackColor];
    self.namelabel.font = [UIFont systemFontOfSize:50 * px];
    [self.bigtopView addSubview:self.namelabel];
    
    
    
    /** 姓名*/
    self.addcardlabel = [[UIButton alloc] init];
    [self.addcardlabel setTitleColor:WYCmainColor forState:UIControlStateNormal] ;
    self.addcardlabel.titleLabel.font = [UIFont systemFontOfSize:50 * px];
    self.addcardlabel.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    self.addcardlabel.backgroundColor = [UIColor redColor];
    [self.bigtopView addSubview:self.addcardlabel];
    
    
    /** 尾号*/
    self.lsnameberlabel = [[UILabel alloc] init];
    self.lsnameberlabel.textColor = WYCRGBColor(52, 52, 52);
    self.lsnameberlabel.font = [UIFont systemFontOfSize:50 * px];;
    [self.bigtopView addSubview:self.lsnameberlabel];
    
    ////////////////
    //////分割线/////
    ///////////////
    UIView * topView = [[UIView alloc] init];
    topView.frame = CGRectMake(0, CGRectGetMaxY(self.bankImageView.frame) +  20 * px, self.topView.width, 1);
    topView.backgroundColor = [UIColor clearColor];
    [self.bigtopView addSubview:topView];
    
    
    
    /** 判断还款类型*/
    self.typelabel = [[UILabel alloc] init];
    //    self.typelabel.backgroundColor = WYCRGBColor(207, 105, 69);
    self.typelabel.textAlignment = NSTextAlignmentCenter;
    self.typelabel.textColor = [UIColor whiteColor];
    
    self.typelabel.font = [UIFont systemFontOfSize:50 * px];
    [self.bigtopView addSubview:self.typelabel];
    
    
    
    /** 账单日.天*/
    self.Statementlabel = [[UILabel alloc] init];
    self.Statementlabel.textColor = WYZBlackBg;
    self.Statementlabel.font = [UIFont systemFontOfSize:50 * px];
    [self.bigtopView addSubview:self.Statementlabel];
    
    
    
    /** 账单日.出账单*/
    self.accountlabel = [[UILabel alloc] init];
    self.accountlabel.textColor = WYCRGBColor(186, 186, 186);
    self.accountlabel.font = [UIFont systemFontOfSize:50 * px];;
    [self.bigtopView addSubview:self.accountlabel];
    
    /** 还款日*/
    self.staylabel = [[UILabel alloc] init];
    self.staylabel.textColor = WYCRGBColor(186, 186, 186);
    self.staylabel.font = [UIFont systemFontOfSize:50 * px];;
    [self.bigtopView addSubview:self.staylabel];
    
    
    
    /** 姓名*/
    self.addcardlabel = [[UIButton alloc] init];
    [self.addcardlabel setTitleColor:WYCMain forState:UIControlStateNormal] ;
    self.addcardlabel.titleLabel.font = [UIFont systemFontOfSize:50 * px];
    self.addcardlabel.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    [self.bigtopView addSubview:self.addcardlabel];
    
    ////////////////
    //////分割线/////
    ///////////////
    
    self.bommoView = [[UIView alloc] init];
    
    self.bommoView.backgroundColor = WYCRGBColor(240, 240, 240);
    [self.bigtopView addSubview:self.bommoView];
    
    /** 本期账单余额*/
    self.balancelabel = [[UILabel alloc] init];
    self.balancelabel.textColor = WYCRGBColor(186, 186, 186);
    self.balancelabel.font = [UIFont systemFontOfSize:50 * px];
    [self.bigtopView addSubview:self.balancelabel];
    
    //
    //
    
}

- (void)setBillmodelFrame:(WYCBillFrameModel *)billmodelFrame{
    _billmodelFrame = billmodelFrame;
    
    WYCBillModel * Billmodel = billmodelFrame.Billmodel;
    
    self.topView.frame = billmodelFrame.topViewF;
    
    
    self.bigtopView.frame = billmodelFrame.bigtopViewF;
    self.bigtopView.contentMode = UIViewContentModeScaleAspectFill;
    self.bigtopView.clipsToBounds = YES;
    [self.bigtopView setContentScaleFactor:[[UIScreen mainScreen] scale]];
    
    
    //银行图片
    self.bankImageView.frame = billmodelFrame.imageViewF;
    self.bankImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.bankImageView.layer.contentsGravity = kCAGravityResizeAspectFill;
    self.bankImageView.clipsToBounds = YES;
    [self.bankImageView setContentScaleFactor:[[UIScreen mainScreen] scale]];
    
    NSInteger bankid = [billmodelFrame.Billmodel.bankId integerValue];
    
    switch (bankid) {
        case -2://招商银行
            self.bankImageView.image = [UIImage imageNamed:@""];
            self.bigtopView.backgroundColor = [UIColor whiteColor];
            break;
        case -1://招商银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_zhaoshang"];
            self.bigtopView.image =  [UIImage imageNamed:@"bank_bg_zhaoshang"];
            break;
        case 10000://招商银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_zhaoshang"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_zhaoshang"];
            break;
        case 10001://工商银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_gs"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_gs"];
            break;
        case 10002://农业银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_ny"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_ny"];
            break;
        case 10003://  建设银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_js"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_jianshe"];
            break;
        case 10004://中国银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_zhongguo"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_zhongguo"];
            break;
        case 10005:  //浦发银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_pufa"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_pufa"];
            break;
        case 10006:  //交通银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_jiaotong"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_jiaotong"];
            break;
        case 10007:  //民生银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_minsheng"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_minsheng"];
            break;
        case 10009:  //广东发展银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_gf"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_gf"];
            break;
        case 10010:  //中信银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_zhongxin"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_zhongxin"];
            break;
        case 10011:  //  华夏银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_hx"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_hx"];
            break;
        case 10012:  //  兴业银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_xingye"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_xingye"];
            break;
        case 10014:  //  江苏银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_jiangsu"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_jiangsu"];
            break;
        case 10016:  //  北京银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_bj"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_bj"];
            break;
        case 10020://10020  光大银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_gd"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_gd"];
            break;
        case  10024://平安银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_pinan"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_pinan"];
            break;
        case 10027:  //上海银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_shanghai"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_shanghai"];
            break;
        case  10028://  中国邮政储蓄银行
            self.bankImageView.image = [UIImage imageNamed:@"bank_circle_youzheng"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_youzheng"];
            break;
            
        default:
            self.bankImageView.image = [UIImage imageNamed:@"icon_other_bank"];
            self.bigtopView.image = [UIImage imageNamed:@"bank_bg_youzheng"];
            break;
    }
    
    //银行名称
    self.banklabel.frame = billmodelFrame.bankNameF;
    
    self.banklabel.text = [NSString stringWithFormat:@"%@(%@)",Billmodel.bankName,Billmodel.lastNumber];
    
    self.billamoutlabel.frame = billmodelFrame.billAmountF;
    self.billamoutlabel.text = [NSString stringWithFormat:@"%.2f",[Billmodel.billAmount doubleValue]];
    
    
    self.addcardlabel.frame = billmodelFrame.addcardF;
    [self.addcardlabel setTitle:Billmodel.addcard forState:UIControlStateNormal];
    
    self.namelabel.frame = billmodelFrame.nameF;
    self.namelabel.text = billmodelFrame.Billmodel.name;
    //尾号
    self.lsnameberlabel.frame = billmodelFrame.lastNumberF;
    NSString * lastNumberStr = [NSString stringWithFormat:@"尾号 %@",Billmodel.lastNumber];
    self.lsnameberlabel.text = lastNumberStr;
    
    
    self.bommoView.frame = billmodelFrame.lineF;
    
    
    
    //账单.天
    if ([Billmodel.userId isEqualToString:@"-1"]) {
        self.Statementlabel.frame = billmodelFrame.outbBllDayF;
        NSString * outbBllDayStr = [NSString stringWithFormat:@"0 天后出账单"];
        self.Statementlabel.text = outbBllDayStr;
    }else{
    self.Statementlabel.frame = billmodelFrame.outbBllDayF;
    NSString * outbBllDayStr = [NSString stringWithFormat:@"%@ 天后出账单",Billmodel.outbBllDay];
    NSMutableAttributedString *attrDescribeStr = [[NSMutableAttributedString alloc] initWithString:outbBllDayStr];
    
    NSRange range = [outbBllDayStr rangeOfString:@"天"];
    NSString * str = [outbBllDayStr substringToIndex:range.location];
    
    [attrDescribeStr addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:[outbBllDayStr rangeOfString:str]];
    
    
    NSRange billDaterange = [Billmodel.billDate rangeOfString:@"月"];
    
    NSRange billdaysrange = [Billmodel.billDate rangeOfString:@"日"];
    
    NSString * billstr = [Billmodel.billDate substringToIndex:billDaterange.location];
    
    NSString * billdaystr = [Billmodel.billDate substringToIndex:billdaysrange.location];
    
    self.Statementlabel.attributedText = attrDescribeStr;
    
    
    
    NSDate *date =[NSDate date];//简书 FlyElephant
    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
    
    [formatter setDateFormat:@"yyyy"];
    NSInteger currentYear=[[formatter stringFromDate:date] integerValue];
    [formatter setDateFormat:@"MM"];
    NSInteger currentMonth=[[formatter stringFromDate:date]integerValue];
    [formatter setDateFormat:@"dd"];
    NSInteger currentDay=[[formatter stringFromDate:date] integerValue];
    
    
    NSArray * arr = [billdaystr componentsSeparatedByString:@"月"];
    
    if ([billstr integerValue] == currentMonth){
        
        if (currentDay >= [arr[1] integerValue]){
            
            self.Statementlabel.attributedText = [[NSMutableAttributedString alloc] initWithString:@"本期账单"];
            
        }else{
            
            self.Statementlabel.attributedText = attrDescribeStr;
        }
        
    }
    
    }
    
    self.accountlabel.frame = billmodelFrame.billDateF;
    NSString *accountStr = [NSString stringWithFormat:@"账单日：%@",Billmodel.billDate];
    self.accountlabel.text = accountStr;
    
    
    //还款日
    self.staylabel.frame = billmodelFrame.dueDateF;
    NSString *stayStr = [NSString stringWithFormat:@"还款日：%@",Billmodel.dueDate];
    self.staylabel.text = stayStr;
    
    //是否认证
//    self.typelabel.frame = billmodelFrame.approveF;
    if ([Billmodel.approve isEqualToString:@"-1"]) {
        self.repaymentButton = [[UIButton alloc] init];
        NSString * approve = [NSString stringWithFormat:@"示例卡"];
        CGSize approveSize = [approve sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:70 * px]}];
        self.repaymentButton.frame = CGRectMake(self.bigtopView.width - approveSize.width - 60 * px, self.Statementlabel.y, approveSize.width, approveSize.height);
        //        self.repaymentButton.frame = CGRectMake(self.staylabel.x + 40 * px, self.Statementlabel.y, self.staylabel.width, 80 * px);
        //                self.repaymentButton.backgroundColor = [UIColor redColor];
        [self.repaymentButton setTitle:approve forState:UIControlStateNormal];
        [self.repaymentButton.layer setBorderWidth:1.0];
        self.repaymentButton.layer.cornerRadius = 40 * px;
        self.repaymentButton.layer.masksToBounds = YES;
        //设置边框颜色有两种方法：第一种如下:
        self.repaymentButton.layer.borderWidth = 1;
        
        self.repaymentButton.layer.borderColor = WYCMain.CGColor;
        
        //            [self.repaymentButton.layer setBorderColor:colorref];//边框颜色
        self.repaymentButton.titleLabel.font = [UIFont systemFontOfSize:SmallFont];
        [self.repaymentButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [self.topView addSubview:self.repaymentButton];
    }else if ([Billmodel.approve isEqualToString:@"-2"]){
        // 立即还款
        self.repaymentButton = [[UIButton alloc] init];
        
        [self.topView addSubview:self.repaymentButton];
        
    }
    else if ([Billmodel.approve isEqualToString:@"2"]) {
        // 立即还款
        self.repaymentButton = [[UIButton alloc] init];
        NSString * approve = [NSString stringWithFormat:@"立即认证"];
        CGSize approveSize = [approve sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:70 * px]}];
        self.repaymentButton.frame = CGRectMake(self.bigtopView.width - approveSize.width - 60 * px, self.Statementlabel.y, approveSize.width, approveSize.height);
//        self.repaymentButton.frame = CGRectMake(self.staylabel.x + 40 * px, self.Statementlabel.y, self.staylabel.width, 80 * px);
//                self.repaymentButton.backgroundColor = [UIColor redColor];
        [self.repaymentButton setTitle:@"立即认证" forState:UIControlStateNormal];
        [self.repaymentButton.layer setBorderWidth:1.0];
        self.repaymentButton.layer.cornerRadius = 40 * px;
        self.repaymentButton.layer.masksToBounds = YES;
        //设置边框颜色有两种方法：第一种如下:
        self.repaymentButton.layer.borderWidth = 1;
        
        self.repaymentButton.layer.borderColor = WYCMain.CGColor;
        
        //            [self.repaymentButton.layer setBorderColor:colorref];//边框颜色
        self.repaymentButton.titleLabel.font = [UIFont systemFontOfSize:SmallFont];
        [self.repaymentButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [self.topView addSubview:self.repaymentButton];
        
    }else{
        if ([Billmodel.userCard isEqualToString:@"0"]) {
            NSString * aooroveStr = [NSString stringWithFormat:@"他人卡"];
            self.typelabel.text = aooroveStr;
            self.typelabel.backgroundColor = WYCmainColor;
        }
        else{
            if ([Billmodel.state isEqualToString:@"0"]){
                
                self.typelabel.text = @"";
            } else if ([Billmodel.state isEqualToString:@"1"]){
                NSString * aooroveStr = [NSString stringWithFormat:@"待还款"];
                CGSize stateSize = [aooroveStr sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:48 * px]}];
                self.typelabel.text = aooroveStr;
                self.typelabel.backgroundColor = WYCmainColor;
                self.typelabel.frame = CGRectMake(self.bigtopView.width - stateSize.width - 110 * px, self.Statementlabel.y, stateSize.width + 60 * px, stateSize.height);
                   UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.typelabel.layer.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(20 * px, 20 * px)];
                CAShapeLayer * maskLayer = [CAShapeLayer new];
                maskLayer.frame = self.typelabel.layer.bounds;
                maskLayer.path = maskPath.CGPath;
                self.typelabel.layer.mask = maskLayer;
            }else if ([Billmodel.state isEqualToString:@"2"]){
                NSString * aooroveStr = [NSString stringWithFormat:@"已还清"];
                CGSize stateSize = [aooroveStr sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:48 * px]}];
                self.typelabel.text = aooroveStr;
                self.typelabel.backgroundColor = [UIColor greenColor];
                self.typelabel.frame = CGRectMake(self.bigtopView.width - stateSize.width - 110 * px, self.Statementlabel.y, stateSize.width + 60 * px, stateSize.height);
                UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.typelabel.layer.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(20 * px, 20 * px)];
                CAShapeLayer * maskLayer = [CAShapeLayer new];
                maskLayer.frame = self.typelabel.layer.bounds;
                maskLayer.path = maskPath.CGPath;
                self.typelabel.layer.mask = maskLayer;
            }else if ([Billmodel.state isEqualToString:@"3"]){
                NSString * aooroveStr = [NSString stringWithFormat:@"智能还款中"];
                self.typelabel.text = aooroveStr;
                CGSize stateSize = [aooroveStr sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:48 * px]}];
                self.typelabel.backgroundColor = [UIColor blueColor];
                self.typelabel.frame = CGRectMake(self.bigtopView.width - stateSize.width - 110 * px, self.Statementlabel.y, stateSize.width + 60 * px, stateSize.height);
                UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.typelabel.layer.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(20 * px, 20 * px)];
                CAShapeLayer * maskLayer = [CAShapeLayer new];
                maskLayer.frame = self.typelabel.layer.bounds;
                maskLayer.path = maskPath.CGPath;
                self.typelabel.layer.mask = maskLayer;
            }else{
                
                NSString * aooroveStr = [NSString stringWithFormat:@"智能还款中止"];
                CGSize stateSize = [aooroveStr sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:48 * px]}];
                self.typelabel.text = aooroveStr;
                self.typelabel.backgroundColor = [UIColor redColor];
                self.typelabel.frame = CGRectMake(self.bigtopView.width - stateSize.width - 110 * px, self.Statementlabel.y, stateSize.width + 60 * px, stateSize.height);
                UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.typelabel.layer.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(20 * px, 20 * px)];
                CAShapeLayer * maskLayer = [CAShapeLayer new];
                maskLayer.frame = self.typelabel.layer.bounds;
                maskLayer.path = maskPath.CGPath;
                self.typelabel.layer.mask = maskLayer;
            }
        }
        
    }
    
}
- (void)repayMentClick{
    
    WYCLogFunc;
}
+(NSString *)ID{
    return @"cell";
}

@end

